<?php

if (file_exists(dirname(__file__) . '/../simplify.php')) {
  die('You should not be here');
}

define('SY_DEBUG_LEVEL', 2);
//define('SY_LOG_ERRORS', false);
//define('SY_CATCH_ERRORS', false);
//define('SY_LOG_EXCEPTIONS', false);

if (file_exists(dirname(__file__) . '/../simplify/simplify.php')) {
  require_once(dirname(__file__) . '/../simplify/simplify.php');
}
elseif (file_exists(dirname(__file__) . '/../../simplify/simplify.php')) {
  require_once(dirname(__file__) . '/../../simplify/simplify.php');
}
else {
  die('Simplify was not found');
}

$sy_app = Simplify::createInstance(dirname(__file__));

if (file_exists(dirname(__file__) . '/config.php')) {
  require_once('config.php');
}

$sy_app->dispatch();

?>